package org.jeecg.modules.audit.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.audit.entity.ConContentRemarkReply;
import org.jeecg.modules.audit.service.IConContentRemarkReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
* @Description: 内容评论回复
* @Author: jeecg-boot
* @Date:   2020-05-02
* @Version: V1.0
*/
@Slf4j
@Api(tags="内容评论回复")
@RestController
@RequestMapping("/content/conContentRemarkReply")
public class ConContentRemarkReplyController extends JeecgController<ConContentRemarkReply, IConContentRemarkReplyService> {
   @Autowired
   private IConContentRemarkReplyService conContentRemarkReplyService;

   /**
    * 分页列表查询
    *
    * @param conContentRemarkReply
    * @param pageNo
    * @param pageSize
    * @param req
    * @return
    */
   @AutoLog(value = "内容评论回复-分页列表查询")
   @ApiOperation(value="内容评论回复-分页列表查询", notes="内容评论回复-分页列表查询")
   @GetMapping(value = "/list")
   public Result<?> queryPageList(ConContentRemarkReply conContentRemarkReply,
                                  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
                                  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                  HttpServletRequest req) {
       QueryWrapper<ConContentRemarkReply> queryWrapper = QueryGenerator.initQueryWrapper(conContentRemarkReply, req.getParameterMap());
       Page<ConContentRemarkReply> page = new Page<ConContentRemarkReply>(pageNo, pageSize);
       IPage<ConContentRemarkReply> pageList = conContentRemarkReplyService.page(page, queryWrapper);
       return Result.ok(pageList);
   }




}
